import request from '@/utils/request'
//获取品牌商品
export const reqTradeMarkList =(page,limit)=>request({url:`/admin/product/baseTrademark/${page}/${limit}`,method:'get'})

//添加品牌
// /admin/product/baseTrademark/save
//修改品牌
// /admin/product/baseTrademark/update
export const reqAddOrUpdateTradeMark=(tradeMark)=>{
    if (tradeMark.id) {
        //修改
        return request({url:'/admin/product/baseTrademark/update',method:'put',data:tradeMark})
    } else {
        //新增
        return request({url:'/admin/product/baseTrademark/save',method:'post',data:tradeMark})
    }
}

//删除商品
export const deleteTradeMark=(id)=>request({url:`/admin/product/baseTrademark/remove/${id}`,method:'delete'})